<template>
  <div class="order-checked-main">
    <div class="header-main">
      <span class="left-icon" @click="goBack"><van-icon name="arrow-left" /></span>
      <div class="center">充值</div>
      <span class="icon-right" @click="$router.push('/rechargeRecode')">记录</span>
    </div>
    <div class="recharge-list">
      <el-form ref="form" :model="form">
        <el-form-item style="margin-top: -20px" label="区块链网络">
          <div class="network">
            <div class="box active">
              OMNI
              <div class="checked"><van-icon class="font" style="" name="success" /></div>
            </div>
          </div>
        </el-form-item>
        <el-form-item>
          <div class="save-image">
            <img src="../../assets/image/ewm.png" alt="">
            <p>
              <van-button>保存二维码</van-button>
            </p>
          </div>
        </el-form-item>
        <el-form-item style="margin-top: -20px"  label="充值地址">
          <div class="address">
            <span>dsasadnasdaslkhdashdashdashdasasd</span>
            <span>复制</span>
          </div>
        </el-form-item>
        <el-form-item style="margin-top: -20px"  label="充值数量">
          <div class="address">
            <input type="text" placeholder="请输入数量">
<!--            <span>复制</span>-->
          </div>
        </el-form-item>
        <el-form-item  label="预计到账(当前汇率 1 : 70,284.42)">
          <div class="address">
            <input type="text" placeholder="请输入数量">
            <span style="color: #333333">USDT</span>
          </div>
        </el-form-item>
        <el-form-item  label="上传图片">
            <div class="upload">
              <div class="uploads">
                <van-uploader :after-read="afterRead" />
              </div>
            </div>
        </el-form-item>
        <el-form-item>
          <van-button type="warning" block>提交</van-button>
        </el-form-item>
      </el-form>
    </div>
</div>
</template>

<script>
export default {
  name: "index",
  data(){
    return{
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      }
    }
  },
  methods: {
    goBack() {
      this.$router.go(-1)
    },
    afterRead(file) {
      // 此时可以自行将文件上传至服务器
    },
  }
}
</script>

<style scoped lang="scss">
.order-checked-main {
  width: 100%;
  background: #ffffff;
  min-height: 100vh;

  .header-main {
  width: 100%;
  height: 45px;
  padding: 15px 0 0 0;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #fff;

.left-icon {
  position: absolute;
  left: 20px;
}

.center {
  width: 100%;
  height: 45px;
  text-align: center;
  line-height: 45px;
  font-size: 15px;
}

.icon-right {
  position: absolute;
  right: 20px !important;
  font-size: 12px;
  color: #aaaaaa;
}

}
  .recharge-list{
    width: 100%;
    padding: 5%;
    box-sizing: border-box;
  }
  .network{
    width: 100%;
    margin-top: 40px;

    .box{
      width: 120px;
      position: relative;
      text-align: center;
      line-height: 40px;
      font-size: 14px;
      height: 40px;
      border: 1px solid #f6f6f6;
      .checked{
        position: absolute;
        width: 30px;
        color: #fff;
        height: 20px;
        right: 0;
        bottom: 0;
        font-size: 14px;
        box-sizing: border-box;
        background: linear-gradient(315deg, #f89220,#f89220 50%,  transparent 0,transparent 50%);
        .font{
          position: absolute;
          top: 5px;
          right: 1px;
        }
      }
    }
    .active{
      border: 1px solid #f89220;
      border-radius: 5px;
    }

  }
  .save-image{
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    img{
      width: 150px;
      height: 150px;
    }
    p{
      width: 100%;
      margin-top: 20px;
      text-align: center;
    }
  }
  .address{
    width: 100%;
    height: 40px;
    margin-top: 40px;
    border: 1px solid #DCDFE6;
    border-radius: 5px;
    display: flex;
    align-items: center;
    padding: 0 3%;
    justify-content: space-between;
    box-sizing: border-box;
    span:nth-child(1){
      font-size: 14px;
    }
    span:nth-child(2){

      font-size: 14px;
      color: #f89220;
    }
  }
  .upload{
    width: 100%;
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    .uploads{
      border: 2px #999 dashed;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}

</style>
